#include <stdio.h>
#include <stdlib.h>
int main()
{
    long a = 0, b = 1, t = 0, i = 0;
    double golden_ratio = 0.0;
    //printf("%d ", a);
    //printf("%d ", b);
    while (i < 40)
    {
        t = a + b;
        //printf("%d ", t);
        golden_ratio = (double)t / b;
        a = b;
        b = t;
        ++i;
    }
    printf("%f", golden_ratio);
    return 0;
}

